import matplotlib.pyplot as plt
import pandas as pd
df = pd.read_excel('图书各地区销售表.xlsx',index_col=0)
data= df.agg('sum')
plt.pie(data,labels=df.columns,autopct='%.2f%%')
plt.rcParams['font.sans-serif']='SimHei'
plt.title('图书各地区销售额饼状图')
plt.show()